<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>用户的列表页</title>
</head>
<style type="text/css">
    table td {
        width: 40px;
        text-align: center;
        font-size: 20px;
    }
</style>
<body>
<a href="/thymeleaf/toUserAddPage">添加用户</a>
<table border="1" cellpadding="0" cellspacing="0">
    <tr>
        <th>id</th>
        <th>用户名</th>
        <th>密码</th>
        <th>性别</th>
        <th>操作</th>

    </tr>
    <tr th:each="user,status:${userList}">
        <td th:text="${user.id}"></td>
        <td th:text="${user.username}">admin</td>
        <td th:text="${user.password}">11111</td>
        <td th:text="${user.sex==1?'男':'女'}">
        </td>
        <td colspan="2">
            <a th:href="@{/thymeleaf/listById(id=${user.id})}">修改</a>
            <a th:href="@{/thymeleaf/deleteById(id=${user.id})}">删除</a>
        </td>
    </tr>
</table>
</body>
</html>